<html>
<head><meta charset="utf-8"><title>fixing the test suite again · t-compiler/wg-polymorphization · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/index.html">t-compiler/wg-polymorphization</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html">fixing the test suite again</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="206360679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206360679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206360679">(Aug 08 2020 at 19:27)</a>:</h4>
<p>cc <a href="https://github.com/rust-lang/rust/issues/75185">#75185</a> <span class="user-mention" data-user-id="116107">@davidtwco</span> </p>
<p>So after fixing the cycle error I tried to run all tests with polymorphization on and we have some interesting ICE</p>



<a name="206360688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206360688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206360688">(Aug 08 2020 at 19:27)</a>:</h4>
<p>we should probably run the whole test suite with polymorphization on when changing something non trivial <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="206360724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206360724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206360724">(Aug 08 2020 at 19:28)</a>:</h4>
<p>Interesting - might have been introduced by either of the last two PRs, I think I forgot to run the full suite.</p>



<a name="206360739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206360739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206360739">(Aug 08 2020 at 19:29)</a>:</h4>
<p>yeah, I think <a href="https://github.com/rust-lang/rust/issues/75255">#75255</a> is at fault here, currently formatting the type which causes the failure <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="206360740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206360740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206360740">(Aug 08 2020 at 19:29)</a>:</h4>
<p>Do you get the impression that the ICEs show the changes we’ve made recently to be entirely incorrect?</p>



<a name="206360815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206360815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206360815">(Aug 08 2020 at 19:31)</a>:</h4>
<p>hmm, not yet sure. <code>codegen_fulfill_obligation</code> now fails, not sure how to deal with that yet</p>



<a name="206360864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206360864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206360864">(Aug 08 2020 at 19:32)</a>:</h4>
<p>why did I look at the one test with 830 lines of code here</p>



<a name="206360875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206360875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206360875">(Aug 08 2020 at 19:33)</a>:</h4>
<p>there are less than 10 failures, and I hope one of them is shorter <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="206361087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361087">(Aug 08 2020 at 19:38)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">bar</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">println</span><span class="o">!</span><span class="p">(</span><span class="s">&quot;foo&quot;</span><span class="p">);</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">struct</span> <span class="nc">Baz</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Baz</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">Baz</span>::<span class="n">bar</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>Is one of the failures</p>



<a name="206361104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361104">(Aug 08 2020 at 19:38)</a>:</h4>
<p>So it was the way we deal with promoteds <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="206361142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361142">(Aug 08 2020 at 19:38)</a>:</h4>
<p>Huh</p>



<a name="206361147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361147">(Aug 08 2020 at 19:38)</a>:</h4>
<p>At least that's what I expect</p>



<a name="206361155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361155">(Aug 08 2020 at 19:39)</a>:</h4>
<p>println is at fault <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span> "foo" alone does not ICE</p>



<a name="206361173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361173">(Aug 08 2020 at 19:39)</a>:</h4>
<p>let me try to unfold <code>println!</code></p>



<a name="206361228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361228">(Aug 08 2020 at 19:41)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="n">error</span>: <span class="nc">internal</span><span class="w"> </span><span class="n">compiler</span><span class="w"> </span><span class="n">error</span>: <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">lcnr</span><span class="o">/</span><span class="n">rust4</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">librustc_middle</span><span class="o">/</span><span class="n">macros</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">16</span>:<span class="mi">9</span>: <span class="nc">encountered</span><span class="w"> </span><span class="n">bad</span><span class="w"> </span><span class="n">ConstKind</span><span class="w"> </span><span class="n">after</span><span class="w"> </span><span class="n">monomorphizing</span>:
  <span class="nc">Error</span><span class="p">(</span><span class="n">DelaySpanBugEmitted</span><span class="p">(())),</span><span class="w"></span>
<span class="w">  </span><span class="n">ct</span>: <span class="nc">Const</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">ty</span>: <span class="kp">&amp;</span><span class="p">[</span><span class="o">&amp;</span><span class="kt">str</span><span class="p">;</span><span class="w"> </span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">val</span>: <span class="nc">Unevaluated</span><span class="p">(</span><span class="n">WithOptConstParam</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">did</span>: <span class="nc">DefId</span><span class="p">(</span><span class="mi">0</span>:<span class="mi">4</span><span class="w"> </span><span class="o">~</span><span class="w"> </span><span class="n">ok</span><span class="p">[</span><span class="mi">317</span><span class="n">d</span><span class="p">]</span>::<span class="n">Foo</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>::<span class="n">bar</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span><span class="w"> </span><span class="n">const_param_did</span>: <span class="nc">None</span><span class="w"> </span><span class="p">},</span><span class="w"> </span><span class="p">[</span><span class="bp">Self</span><span class="p">],</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">promoted</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="o">-</span>-&gt; <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">lcnr</span><span class="o">/</span><span class="n">rust4</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">test</span><span class="o">/</span><span class="n">ui</span><span class="o">/</span><span class="n">__check</span><span class="o">/</span><span class="n">ok</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">5</span>:<span class="mi">41</span><span class="w"></span>
<span class="w">   </span><span class="o">|</span><span class="w"></span>
<span class="n">LL</span><span class="w"> </span><span class="o">|</span><span class="w">         </span><span class="n">std</span>::<span class="n">io</span>::<span class="n">_print</span><span class="p">(</span><span class="n">format_args_nl</span><span class="o">!</span><span class="p">(</span><span class="s">&quot;foo&quot;</span><span class="p">));</span><span class="w"></span>
<span class="w">   </span><span class="o">|</span><span class="w">                                         </span><span class="o">^^^^^</span><span class="w"></span>

<span class="n">thread</span><span class="w"> </span><span class="na">&#39;rustc</span><span class="err">&#39;</span><span class="w"> </span><span class="n">panicked</span><span class="w"> </span><span class="n">at</span><span class="w"> </span><span class="na">&#39;Box</span><span class="o">&lt;</span><span class="n">Any</span><span class="o">&gt;</span><span class="err">&#39;</span><span class="p">,</span><span class="w"> </span><span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">lcnr</span><span class="o">/</span><span class="n">rust4</span><span class="o">/</span><span class="n">library</span><span class="o">/</span><span class="n">std</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">macros</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">13</span>:<span class="mi">23</span><span class="w"></span>
</code></pre></div>



<a name="206361344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361344">(Aug 08 2020 at 19:43)</a>:</h4>
<p>uff</p>



<a name="206361346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361346">(Aug 08 2020 at 19:43)</a>:</h4>
<p>I think I know what went wrong</p>



<a name="206361387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361387">(Aug 08 2020 at 19:44)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="w">            </span><span class="n">ty</span>::<span class="n">ConstKind</span>::<span class="n">Unevaluated</span><span class="p">(</span><span class="n">_</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="p">,</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">p</span><span class="p">))</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="c1">// If there is a promoted, don&#39;t look at the substs - since it will always contain</span>
<span class="w">                </span><span class="c1">// the generic parameters, instead, traverse the promoted MIR.</span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">promoted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">tcx</span><span class="p">.</span><span class="n">promoted_mir</span><span class="p">(</span><span class="bp">self</span><span class="p">.</span><span class="n">def_id</span><span class="p">);</span><span class="w"></span>
<span class="w">                </span><span class="bp">self</span><span class="p">.</span><span class="n">visit_body</span><span class="p">(</span><span class="o">&amp;</span><span class="n">promoted</span><span class="p">[</span><span class="n">p</span><span class="p">]);</span><span class="w"></span>
<span class="w">                </span><span class="kc">false</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="206361397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361397">(Aug 08 2020 at 19:44)</a>:</h4>
<p>we need the promoted_mir of the <code>ConstKind::Unevaluated(def, ..)</code> instead of <code>self.def_id</code> I think</p>



<a name="206361406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361406">(Aug 08 2020 at 19:45)</a>:</h4>
<p>nm</p>



<a name="206361417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361417">(Aug 08 2020 at 19:45)</a>:</h4>
<p>still broken <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="206361419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361419">(Aug 08 2020 at 19:46)</a>:</h4>
<p>another idea...</p>



<a name="206361614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361614">(Aug 08 2020 at 19:51)</a>:</h4>
<p>Is it the promoted case or the non-promoted case?</p>



<a name="206361622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361622">(Aug 08 2020 at 19:51)</a>:</h4>
<p>promoted</p>



<a name="206361669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361669">(Aug 08 2020 at 19:52)</a>:</h4>
<p>Is that the only ICE or are there others?</p>



<a name="206361671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361671">(Aug 08 2020 at 19:53)</a>:</h4>
<p>not sure if all ICE have the same cause</p>



<a name="206361674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361674">(Aug 08 2020 at 19:53)</a>:</h4>
<p>will just go one by one for now</p>



<a name="206361676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361676">(Aug 08 2020 at 19:53)</a>:</h4>
<p>I assume some cases have the cycle error we saw on CI.</p>



<a name="206361679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361679">(Aug 08 2020 at 19:53)</a>:</h4>
<p>the cycle error is already fixed</p>



<a name="206361680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361680">(Aug 08 2020 at 19:53)</a>:</h4>
<p>that one was easy <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="206361844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361844">(Aug 08 2020 at 19:58)</a>:</h4>
<p>Oh, fantastic, what was it?</p>



<a name="206361866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361866">(Aug 08 2020 at 20:00)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="n">ty</span>::<span class="n">ConstKind</span>::<span class="n">Unevaluated</span><span class="p">(</span><span class="n">def</span><span class="p">,</span><span class="w"> </span><span class="n">unevaluated_substs</span><span class="p">,</span><span class="w"> </span><span class="nb">None</span><span class="p">)</span><span class="w"></span>
<span class="w">                </span><span class="k">if</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">tcx</span><span class="p">.</span><span class="n">def_kind</span><span class="p">(</span><span class="n">def</span><span class="p">.</span><span class="n">did</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">DefKind</span>::<span class="n">AnonConst</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"></span>
<span class="w">            </span><span class="p">{</span><span class="w"></span>
</code></pre></div>



<a name="206361908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361908">(Aug 08 2020 at 20:00)</a>:</h4>
<p>just ignoring associated consts for now <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="206361922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206361922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206361922">(Aug 08 2020 at 20:00)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="206363222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363222">(Aug 08 2020 at 20:38)</a>:</h4>
<p>so I think there are 2 issues here...</p>
<p>For promoteds we try to solve the instance of their body which somehow fails when used with traits (not sure why yet)</p>



<a name="206363232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363232">(Aug 08 2020 at 20:38)</a>:</h4>
<p>resolving <code>FnDef</code> seems to require the <code>FnDef</code> to be fully monomorphic or something <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span> haven't looked too much into this</p>



<a name="206363299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363299">(Aug 08 2020 at 20:40)</a>:</h4>
<p>Polymorphization also makes this example compile, which is slightly worrying:</p>
<div class="codehilite"><pre><span></span><code><span class="cp">#[derive(Clone)]</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">D</span><span class="w"> </span><span class="p">(</span><span class="nb">Box</span><span class="o">&lt;</span><span class="n">A</span><span class="o">&gt;</span><span class="p">);</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">D</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">matches</span><span class="o">&lt;</span><span class="n">F</span>: <span class="nb">Fn</span><span class="p">()</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">f</span>: <span class="kp">&amp;</span><span class="nc">F</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="c1">//~^ ERROR reached the type-length limit while instantiating `D::matches::&lt;[closure</span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="o">&amp;</span><span class="n">D</span><span class="p">(</span><span class="k">ref</span><span class="w"> </span><span class="n">a</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">;</span><span class="w"></span>
<span class="w">        </span><span class="n">a</span><span class="p">.</span><span class="n">matches</span><span class="p">(</span><span class="n">f</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">matches</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">A</span><span class="p">(</span><span class="n">B</span>::<span class="n">Variant1</span><span class="p">).</span><span class="n">matches</span><span class="p">(</span><span class="o">&amp;</span><span class="p">(</span><span class="o">||</span><span class="w"> </span><span class="p">()))</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="206363305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363305">(Aug 08 2020 at 20:41)</a>:</h4>
<p>As we now have (luckily rare) edge cases where the compilation result depends on optimizations</p>



<a name="206363360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363360">(Aug 08 2020 at 20:43)</a>:</h4>
<p>Ah, this is already the case without polymorphization</p>
<div class="codehilite"><pre><span></span><code><span class="k">struct</span> <span class="nc">L</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">(</span><span class="n">T</span><span class="p">);</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">test</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">test</span>::<span class="o">&lt;</span><span class="n">L</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;&gt;</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">public</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">test</span>::<span class="o">&lt;</span><span class="p">()</span><span class="o">&gt;</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="206363604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363604">(Aug 08 2020 at 20:51)</a>:</h4>
<p>I don’t know that anyone realised just how many edge cases polymorphisation would have.</p>



<a name="206363702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363702">(Aug 08 2020 at 20:54)</a>:</h4>
<blockquote>
<p>resolving FnDef seems to require the FnDef to be fully monomorphic or something <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span> haven't looked too much into this</p>
</blockquote>
<p><a href="https://github.com/rust-lang/rust/blob/1facd4a77b181ad44b9c9a64f0fd21b6d5180458/src/librustc_ty/instance.rs#L164-L166">https://github.com/rust-lang/rust/blob/1facd4a77b181ad44b9c9a64f0fd21b6d5180458/src/librustc_ty/instance.rs#L164-L166</a></p>



<a name="206363715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363715">(Aug 08 2020 at 20:55)</a>:</h4>
<p>Fun, a line we introduced in the initial polymorphisation implementation.</p>



<a name="206363739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363739">(Aug 08 2020 at 20:56)</a>:</h4>
<p><span aria-label="laughter tears" class="emoji emoji-1f602" role="img" title="laughter tears">:laughter_tears:</span></p>



<a name="206363754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363754">(Aug 08 2020 at 20:56)</a>:</h4>
<p>I can’t recall the specifics, but would probably be able to refresh my memory if I reread old conversations with eddy.</p>



<a name="206363757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363757">(Aug 08 2020 at 20:56)</a>:</h4>
<p>afaik this check expects all <code>FnDef</code> to be fully concrete</p>



<a name="206363762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363762">(Aug 08 2020 at 20:57)</a>:</h4>
<p>couldn't we solve this by checking the same thing we check in mir/eval?</p>



<a name="206363765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363765">(Aug 08 2020 at 20:57)</a>:</h4>
<p>i.e. all used generic params are concrete and all unused are <code>ty::Param</code>?</p>



<a name="206363805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363805">(Aug 08 2020 at 20:58)</a>:</h4>
<p>I remember perf being a concern here.</p>



<a name="206363810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363810">(Aug 08 2020 at 20:58)</a>:</h4>
<p><span aria-label="cry" class="emoji emoji-1f622" role="img" title="cry">:cry:</span> put it into a query and hope it is worth it</p>



<a name="206363820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363820">(Aug 08 2020 at 20:59)</a>:</h4>
<p>This check motivated the introduction of the <code>STILL_FURTHER_SPECIALIZABLE</code> flag.</p>



<a name="206363873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363873">(Aug 08 2020 at 21:00)</a>:</h4>
<p>maybe we can use <code>MAY_POLYMORPHIZE</code> here</p>



<a name="206363877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363877">(Aug 08 2020 at 21:00)</a>:</h4>
<p>which should keep the happy path simple</p>



<a name="206363893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363893">(Aug 08 2020 at 21:01)</a>:</h4>
<p>let me just check if usnig <code>ensure_monomorphic_enough</code> actually fixes the problem here <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="206363957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363957">(Aug 08 2020 at 21:03)</a>:</h4>
<p>This particular issue results from the non-promoteds PR, right?</p>



<a name="206363959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363959">(Aug 08 2020 at 21:04)</a>:</h4>
<p>probably even both</p>



<a name="206363999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206363999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206363999">(Aug 08 2020 at 21:04)</a>:</h4>
<p>promoteds had pretty much the same issue from what I can tell</p>



<a name="206364009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206364009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206364009">(Aug 08 2020 at 21:05)</a>:</h4>
<p>On my computer now so I can dig into something</p>



<a name="206364447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206364447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206364447">(Aug 08 2020 at 21:20)</a>:</h4>
<p><span class="user-mention" data-user-id="216206">@lcnr</span> what patches do you have to get to where you are now? Skipping associated consts gets me further but I hit a out of range substitution later when bootstrapping stage2.</p>



<a name="206364489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206364489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206364489">(Aug 08 2020 at 21:20)</a>:</h4>
<p>Or maybe you just started looking at stage1 tests after that.</p>



<a name="206364493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206364493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206364493">(Aug 08 2020 at 21:20)</a>:</h4>
<p>stage1 tests only</p>



<a name="206364570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206364570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206364570">(Aug 08 2020 at 21:23)</a>:</h4>
<p>the oor substitution probably comes from promoteds</p>



<a name="206364573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206364573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206364573">(Aug 08 2020 at 21:23)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/fixing.20the.20test.20suite.20again/near/206361397">said</a>:</p>
<blockquote>
<p>we need the promoted_mir of the <code>ConstKind::Unevaluated(def, ..)</code> instead of <code>self.def_id</code> I think</p>
</blockquote>
<p>this</p>



<a name="206364626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206364626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206364626">(Aug 08 2020 at 21:24)</a>:</h4>
<p>It didn't seem that way:</p>
<div class="codehilite"><pre><span></span><code>error: internal compiler error: src/librustc_middle/ty/subst.rs:530:17: type parameter `M/#4` (M/4) out of range when substituting, substs=[for&lt;&#39;r&gt; fn(&amp;&#39;r std::iter::Map&lt;std::iter::Map&lt;std::ops::Range&lt;usize&gt;, [closure@src/librustc_metadata/rmeta/decoder.rs:247:28: 247:65 dcx:rmeta::decoder::DecodeContext]&gt;, [closure@src/librustc_metadata/rmeta/decoder.rs:1321:26: 1321:98 self:&amp;&amp;creader::CrateMetadataRef]&gt;) -&gt; (usize, std::option::Option&lt;usize&gt;) {&lt;std::iter::Map&lt;std::iter::Map&lt;std::ops::Range&lt;usize&gt;, [closure@src/librustc_metadata/rmeta/decoder.rs:247:28: 247:65 dcx:rmeta::decoder::DecodeContext]&gt;, [closure@src/librustc_metadata/rmeta/decoder.rs:1321:26: 1321:98 self:&amp;&amp;creader::CrateMetadataRef]&gt; as std::iter::Iterator&gt;::size_hint}, (&amp;std::iter::Map&lt;std::iter::Map&lt;std::ops::Range&lt;usize&gt;, [closure@src/librustc_metadata/rmeta/decoder.rs:247:28: 247:65 dcx:rmeta::decoder::DecodeContext]&gt;, [closure@src/librustc_metadata/rmeta/decoder.rs:1321:26: 1321:98 self:&amp;&amp;creader::CrateMetadataRef]&gt;,)]
</code></pre></div>


<p>I didn't dig into it too much before experimenting with what I think the fix might be.</p>



<a name="206365200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365200">(Aug 08 2020 at 21:41)</a>:</h4>
<p>both looking in promoteds and looking into substs  don't work</p>



<a name="206365250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365250">(Aug 08 2020 at 21:42)</a>:</h4>
<p>removing both fixes all issues (meaning that the only remaining change is to look into <code>AnonConst</code>, which might just work because it relies on lazy norm to actually affect anything)</p>



<a name="206365251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365251">(Aug 08 2020 at 21:42)</a>:</h4>
<p>oh boi</p>



<a name="206365265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365265">(Aug 08 2020 at 21:43)</a>:</h4>
<p>I was just checking this - are all the issues related to promoteds and none related to the other PR?</p>



<a name="206365270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365270">(Aug 08 2020 at 21:43)</a>:</h4>
<p>Or do you mean something else?</p>



<a name="206365271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365271">(Aug 08 2020 at 21:43)</a>:</h4>
<p>no, promoteds break on their own</p>



<a name="206365275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365275">(Aug 08 2020 at 21:44)</a>:</h4>
<p>and from the other PR</p>
<div class="codehilite"><pre><span></span><code><span class="n">_</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="o">!</span><span class="n">substs</span><span class="p">.</span><span class="n">may_polymorphize</span><span class="p">()</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">substs</span><span class="p">[</span><span class="n">param</span><span class="p">.</span><span class="n">index</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="kt">usize</span><span class="p">],</span><span class="w"></span>

<span class="w">            </span><span class="c1">// Otherwise, use the substitution after polymorphizing.</span>
<span class="w">            </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">arg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">substs</span><span class="p">[</span><span class="n">param</span><span class="p">.</span><span class="n">index</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="kt">usize</span><span class="p">];</span><span class="w"></span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">polymorphized_arg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arg</span><span class="p">.</span><span class="n">fold_with</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="n">PolymorphizationFolder</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">tcx</span><span class="w"> </span><span class="p">});</span><span class="w"></span>
<span class="w">                </span><span class="n">debug</span><span class="o">!</span><span class="p">(</span><span class="s">&quot;polymorphize: arg={:?} polymorphized_arg={:?}&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">arg</span><span class="p">,</span><span class="w"> </span><span class="n">polymorphized_arg</span><span class="p">);</span><span class="w"></span>
<span class="w">                </span><span class="n">ty</span>::<span class="n">GenericArg</span>::<span class="n">from</span><span class="p">(</span><span class="n">polymorphized_arg</span><span class="p">)</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="206365320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365320">(Aug 08 2020 at 21:44)</a>:</h4>
<p>also causes ICE</p>



<a name="206365324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365324">(Aug 08 2020 at 21:44)</a>:</h4>
<p>right, so both patches were actually broken</p>



<a name="206365325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365325">(Aug 08 2020 at 21:44)</a>:</h4>
<p>yay</p>



<a name="206365467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365467">(Aug 08 2020 at 21:49)</a>:</h4>
<p>polymorphised substs PR introduced the stage2 oob substitution failure too</p>



<a name="206365802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206365802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206365802">(Aug 08 2020 at 22:00)</a>:</h4>
<p>I'm sufficiently tired this evening that I don't expect I'm going to make much progress on these failures - at least I know what I'm doing tomorrow now though.</p>



<a name="206366670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206366670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206366670">(Aug 08 2020 at 22:24)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/216091-t-compiler.2Fwg-polymorphization/topic/fixing.20the.20test.20suite.20again/near/206361397">said</a>:</p>
<blockquote>
<p>we need the promoted_mir of the <code>ConstKind::Unevaluated(def, ..)</code> instead of <code>self.def_id</code> I think</p>
</blockquote>
<p>This is correct. When not doing mir inlining both are identical though.</p>



<a name="206388918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206388918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206388918">(Aug 09 2020 at 10:26)</a>:</h4>
<p>I believe I've got fixes for the failures introduced by the promoteds PR, running the full suite locally and then moving on to the other PR.</p>



<a name="206389773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206389773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206389773">(Aug 09 2020 at 10:49)</a>:</h4>
<p>Full suite passes on stage two, so that PR's issues are fixed.</p>



<a name="206394177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206394177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206394177">(Aug 09 2020 at 13:01)</a>:</h4>
<p>I think we stumbled onto <a href="https://github.com/rust-lang/rust/issues/69925">#69925</a> with the changes in the first PR, so the solution might be to back it out and maybe try a more limited version - e.g. what I had originally w/ just the upvar subst?</p>



<a name="206394772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206394772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206394772">(Aug 09 2020 at 13:19)</a>:</h4>
<p>Opened <a href="https://github.com/rust-lang/rust/issues/75333">#75333</a> with the fixes for the changes in <a href="https://github.com/rust-lang/rust/issues/75260">#75260</a>.</p>



<a name="206394774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206394774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206394774">(Aug 09 2020 at 13:19)</a>:</h4>
<p>If we can get that landed, at least things will be less broken locally with polymorphization enabled.</p>



<a name="206396906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206396906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206396906">(Aug 09 2020 at 14:18)</a>:</h4>
<p>Filed <a href="https://github.com/rust-lang/rust/issues/75337">#75337</a> to restrict <a href="https://github.com/rust-lang/rust/issues/75255">#75255</a>'s changes to only the upvar case that it had originally - that way polymorphization won't be broken on master; and filed <a href="https://github.com/rust-lang/rust/issues/75336">#75336</a> to track making this change again once we can do so without breaking stuff.</p>



<a name="206396921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206396921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206396921">(Aug 09 2020 at 14:18)</a>:</h4>
<p>I'm prioritizing keeping polymorphization working on master rather than spending a lot of time digging into this today.</p>



<a name="206408420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206408420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206408420">(Aug 09 2020 at 19:26)</a>:</h4>
<p>Submitted <a href="https://github.com/rust-lang/rust/issues/75346">#75346</a> with the help of <span class="user-mention silent" data-user-id="119009">eddyb</span> that fixes the out-of-bounds substitution in stage2 that <a href="https://github.com/rust-lang/rust/issues/75255">#75255</a> caused - the UI test failures still exist and it still dies with a linker error in compiling <code>rustc_driver</code>; so will continue to land <a href="https://github.com/rust-lang/rust/issues/75337">#75337</a>.</p>



<a name="206452811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206452811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206452811">(Aug 10 2020 at 12:01)</a>:</h4>
<p><span class="user-mention" data-user-id="216206">@lcnr</span> regarding <a href="https://github.com/rust-lang/rust/issues/75333">#75333</a>, is your recommendation to add a <code>self.def_id == def.did</code> condition or to switch back to using <code>self.def_id</code>?</p>



<a name="206453241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206453241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206453241">(Aug 10 2020 at 12:08)</a>:</h4>
<p>I think <code>self.def_id == def.did</code> is the better approach in the long run</p>



<a name="206453254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206453254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206453254">(Aug 10 2020 at 12:09)</a>:</h4>
<p>using <code>self.def_id</code> would also be broken, wouldn't it?</p>



<a name="206453276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206453276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206453276">(Aug 10 2020 at 12:09)</a>:</h4>
<p>I'm not sure</p>



<a name="206453497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206453497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206453497">(Aug 10 2020 at 12:12)</a>:</h4>
<p>Alright, pushed a change - hopefully the PR is good now.</p>



<a name="206583658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206583658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206583658">(Aug 11 2020 at 14:43)</a>:</h4>
<p>With <a href="https://github.com/rust-lang/rust/issues/75333">#75333</a> and <a href="https://github.com/rust-lang/rust/issues/75337">#75337</a> now merged, polymorphization should be passing all the tests again on master.</p>



<a name="206583851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206583851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206583851">(Aug 11 2020 at 14:44)</a>:</h4>
<p><span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span> wanna rebase <a href="https://github.com/rust-lang/rust/issues/75185">#75185</a> and try another perf run?</p>



<a name="206583914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216091-t-compiler/wg-polymorphization/topic/fixing%20the%20test%20suite%20again/near/206583914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/216091-t-compiler/wg-polymorphization/topic/fixing.20the.20test.20suite.20again.html#206583914">(Aug 11 2020 at 14:45)</a>:</h4>
<p>Will do shortly</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>